function checkFieldNames(dreamPar)

F = fieldnames(dreamPar);
for k=1:numel(F)
    if ~any(strcmp(F{k},authorizedFieldNames))
        error(['Unrecognized field ',char(39),F{k},char(39),...
            ' in variable dreamPar.'])
    end

end


function fields = authorizedFieldNames

fields =...
   {'Cb',...
    'Wb',...
    'boundHandling',...
    'constNames',...
    'convMaxDiff',...
    'convUseLastFraction',...
    'converged',...
    'critGelRubConvd',...
    'crossoverValuesTuning',...
    'covariance',...
    'dateStr',...
    'delayedRejection',...
    'delayedRejectionScale',...
    'drawInterval',...
    'evalCol',...
    'initialMean',...
    'iterCol',...
    'jumpRate',...
    'keepInMemory',...
    'kurt',...
    'logPCol',...
    'measNames',...
    'modeGelRub',...
    'modelCallStr',...
    'nCrossoverValues',...
    'nDiffEvolPairs',...
    'nGelRub',...
    'nMeasurements',...
    'nModelEvalsMax',...
    'nOffspring',...
    'nOffspringFraction',...
    'nOffspringPerSeq',...
    'nOptPars',...
    'nSamples',...
    'nSamplesPerSeq',...
    'nSeq',...
    'objCallStr',...
    'objCol',...
    'optEndTime',...
    'optMethod',...
    'outlierTest',...
    'parCols',...
    'parMap',...
    'parMapTex',...
    'plotYN',...
    'randomErgodicityError',...
    'randomError',...
    'randSeed',...
    'rangeMax',...
    'rangeMin',...
    'reducedSampleCollection',...
    'reducedSampleFrequency',...
    'samplingMethod',...
    'sigma',...
    'startFromUniform',...
    'steps',...
    'thresholdL',...
    'useIniFile',...
    'verboseOutput',...
    'visualizationCall'};